const dataSource = [
    {
        "id": "1100",
        "key": "1100",
        "label": "java基础",
        "versionCode": "1.1",
        "children": [
            {
                "id": "1110",
                "key": "1110",
                "label": "logic java",
                "versionCode": "1.1.1",
                "children": [],
                "children2": null,
                "outlineName": "logic java",
                "sszy": "610e297c3a3f47e3a398bcf7f1c83860",
                "lx": "3",
                "pid": "1100",
                "sfx": 2,
                "tjyy": null,
                "sfgs": 2,
                "departId": null,
                "remark": null,
                "del": 1,
                "createBy": "1"
            },
            {
                "id": "1120",
                "key": "1120",
                "label": "java面向对象",
                "versionCode": "1.1.2",
                "children": [],
                "children2": null,
                "outlineName": "java面向对象",
                "sszy": "610e297c3a3f47e3a398bcf7f1c83860",
                "lx": "3",
                "pid": "1100",
                "sfx": 2,
                "tjyy": null,
                "sfgs": 2,
                "departId": null,
                "remark": null,
                "del": 1,
                "createBy": "1"
            },
            {
                "id": "1130",
                "key": "1130",
                "label": "阶段项目",
                "versionCode": "1.1.3",
                "children": [],
                "children2": null,
                "outlineName": "阶段项目",
                "sszy": "610e297c3a3f47e3a398bcf7f1c83860",
                "lx": "2",
                "pid": "1100",
                "sfx": 2,
                "tjyy": null,
                "sfgs": 2,
                "departId": null,
                "remark": null,
                "del": 1,
                "createBy": "1"
            }
        ],
        "children2": null,
        "outlineName": "java基础",
        "sszy": "610e297c3a3f47e3a398bcf7f1c83860",
        "lx": "3",
        "pid": "1000",
        "sfx": 2,
        "tjyy": null,
        "sfgs": 2,
        "departId": null,
        "remark": null,
        "del": 1,
        "createBy": "1"
    },
    {
        "id": "1200",
        "key": "1200",
        "label": "毕业项目",
        "versionCode": "1.2",
        "children": [],
        "children2": null,
        "outlineName": "毕业项目",
        "sszy": "610e297c3a3f47e3a398bcf7f1c83860",
        "lx": "2",
        "pid": "1000",
        "sfx": 2,
        "tjyy": null,
        "sfgs": 2,
        "departId": null,
        "remark": null,
        "del": 1,
        "createBy": "1"
    }
]


// 过滤item
function updateItem(arr, id) {
    // debugger
    let res = []
    res = arr.filter((v, i) => {
        if (v.id === id) {
            // 移除此项
            return false
        }
        if (v.children.length) {
            v.children = updateItem(v.children, id)
        }
        return true
    })

    return res
}


console.log('updateItem ===> ', updateItem(dataSource, '1110'))